#include "ethercat.h"

const UINT16 Ethercat::cBitMask[16] = {0x0000,0x0001,0x0003,0x0007,0x000F,0x001F,0x003F,0x007F,0x00FF,0x01FF,0x03FF,0x07FF,0x0FFF,0x1FFF,0x3FFF,0x7FFF};
const UINT32 MBXMEM Ethercat::cAbortCode[] =
{
    ABORT_NOERROR,
    ABORT_TOGGLE_BIT_NOT_CHANGED,
    ABORT_SDO_PROTOCOL_TIMEOUT,
    ABORT_COMMAND_SPECIFIER_UNKNOWN,
    ABORT_OUT_OF_MEMORY,
    ABORT_UNSUPPORTED_ACCESS,
    ABORT_WRITE_ONLY_ENTRY,
    ABORT_READ_ONLY_ENTRY,
    ABORT_OBJECT_NOT_EXISTING,
    ABORT_OBJECT_CANT_BE_PDOMAPPED,
    ABORT_MAPPED_OBJECTS_EXCEED_PDO,
    ABORT_PARAM_IS_INCOMPATIBLE,
    ABORT_INTERNAL_DEVICE_INCOMPATIBILITY,
    ABORT_HARDWARE_ERROR,
    ABORT_PARAM_LENGTH_ERROR,
    ABORT_PARAM_LENGTH_TOO_LONG,
    ABORT_PARAM_LENGTH_TOO_SHORT,
    ABORT_SUBINDEX_NOT_EXISTING,
    ABORT_VALUE_EXCEEDED,
    ABORT_VALUE_TOO_GREAT,
    ABORT_VALUE_TOO_SMALL,
    ABORT_MAX_VALUE_IS_LESS_THAN_MIN_VALUE,
    ABORT_GENERAL_ERROR,
    ABORT_DATA_CANNOT_BE_READ_OR_STORED,
    ABORT_DATA_CANNOT_BE_READ_OR_STORED_BECAUSE_OF_LOCAL_CONTROL,
    ABORT_DATA_CANNOT_BE_READ_OR_STORED_IN_THIS_STATE,
    ABORT_NO_OBJECT_DICTIONARY_IS_PRESENT,
    ABORT_ENTRY_CANT_BE_WRITTEN_SI0_NOT_0
};
CHAR OBJMEM Ethercat::aSubindexDesc[13] = "SubIndex 000";

Ethercat::Ethercat()
{
	ObjDicList = NULL;
	aSubindexDesc[13];
	
}

Ethercat::~Ethercat()
{
	HW_Release();
}

Ethercat ethercat;
